package com.example.client.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author YJH
 * @version 1.0
 * @className QueryController
 * @description 查询
 * @date 2020/4/2322:58
 */
@RestController
@RequestMapping(value = "/query")
public class QueryController {

    @Autowired
    EurekaClientConfigBean eurekaClientConfigBean;

    @GetMapping(value = "/eureka-server")
    public Object getEurekaServer(){
        return eurekaClientConfigBean.getServiceUrl();
    }
}
